
// 接口地址
import axios from 'axios'

// 服务器地址
let base = 'http://10.1.0.5:80'
export const imgBase = `${base}/image/`
export const imgUploadimg = `${base}/upload/image`

//
// export const requestLogin = params => { return axios.post(`${base}/user/login`, params).then(res => res.data) }
// export const 自定义的接口名称 = params => { return axios.post(`${base}/接口地址（postman里面的地址）`, params).then(res => res.data) }
export const getUserList = params => { return axios.post(`${base}/user/getUserList`, params).then(res => res.data) }

export const userDelete = params => { return axios.post(`${base}/user/userDelete`, params).then(res => res.data) }

export const userRegister = params => { return axios.post(`${base}/user/userRegister`, params).then(res => res.data) }

export const userUpdate = params => { return axios.post(`${base}/user/userUpdate`, params).then(res => res.data) }

export const productAdd = params => { return axios.post(`${base}/product/productAdd`, params).then(res => res.data) }

export const productUpdate = params => { return axios.post(`${base}/product/productUpdate`, params).then(res => res.data) }

export const getProductList = params => { return axios.post(`${base}/product/getProductList`, params).then(res => res.data) }

export const productDelete = params => { return axios.post(`${base}/product/productDelete`, params).then(res => res.data) }

export const shopAdd = params => { return axios.post(`${base}/shop/shopAdd`, params).then(res => res.data) }

export const shopUpdate = params => { return axios.post(`${base}/shop/shopUpdate`, params).then(res => res.data) }

export const shopDelete = params => { return axios.post(`${base}/shop/shopDelete`, params).then(res => res.data) }

export const getShop = params => { return axios.post(`${base}/shop/getShop`, params).then(res => res.data) }

export const getShopList = params => { return axios.post(`${base}/shop/getShopList`, params).then(res => res.data) }

export const image = params => { return axios.post(`${base}/upload/image`, params).then(res => res.data) }

export const getOrderList = params => { return axios.post(`${base}/order/getOrderList`, params).then(res => res.data) }

export const orderCreate = params => { return axios.post(`${base}/order/orderCreate`, params).then(res => res.data) }

export const orderUpdate = params => { return axios.post(`${base}/order/orderUpdate`, params).then(res => res.data) }
